
import 'package:flutter/material.dart';

import '../../../utils/Settings.dart';

class TreeChcekPage extends StatefulWidget{
  const TreeChcekPage({super.key, required this.options, required this.checkVals, required this.val});
  final List options;
  final Map checkVals;
  final String val;

  @override
  State<TreeChcekPage> createState() =>TreeChcekPageState();

}

class TreeChcekPageState extends State<TreeChcekPage> with AutomaticKeepAliveClientMixin{

  @override
  void initState() {
    super.initState();
  }

  @override
  void dispose() {
    super.dispose();
  }

  @override
  bool get wantKeepAlive => true;

  ///开始自定义业务





  @override
  Widget build(BuildContext context) {
    super.build(context);
    return Checkbox(
      activeColor: Settings.primaryColor,
      side: const BorderSide(color: Color.fromRGBO(194, 194, 194, 1)),
      value: widget.checkVals[widget.val],
      onChanged: (v){
        widget.checkVals[widget.val]=v;
        setState(() {});
      },
    );
  }

}